Quantization Vs. Perceptual Quality
In video processing, quantization is a lossy compression technique achieved by compressing a range of values to a single quantum value. When a video frame is quantized in any system, information is lost. For example, typical video encoders (e.g., MPEG-2) can compress video frames by discarding information that does not contribute to the reconstruction of an image representative of the original image during decoding. The amount of information discarded during encoding depends on how each video frame is quantized. Each video compression format defines a discrete set of quantization settings, and each quantization setting has an abstract identifier, denoted as a quantization parameter (QP). The QP can be arbitrarily defined as, for example, an integer that indexes an array of quantization settings such that quantization noise introduced by a smaller QP value of X is less than the quantization noise introduced by a larger QP value of X+1. The quantization settings indexed by a given QP value can be different for each video codec.
If too much information is discarded during quantization, the video frame may appear distorted when it is decompressed during playback. This captures the relationship between quantization and perceptual quality. Thus, the QP may be used as an indicator of perceptual quality since the QP indicates how much information is discarded when encoding a video frame.
To illustrate that the QP is only a heuristic for estimating the video frame's perceptual quality, one should consider a “low quality” video frame quantized with fine quantization settings. If a video frame is encoded with fine quantization settings—meaning very little information is discarded—the video frame reconstructed by the decoder will very closely match the original video frame. The quantization noise in the reconstructed video frame is very low, but the reconstructed video frame still appears to be low quality since the original video frame was of low quality. This is just one example where the QP does not accurately indicate the perceptual quality of the video.
Quantization vs. Bitrate
In video processing, bitrate refers to a number of bits used per unit of playback time to represent a continuous video after encoding (data compression). Different images or video frames can naturally require a different number of bits to be represented even when they share the same pixel dimensions and are encoded with the same QP. The relationship between QP and compressed byte size for a given video frame, however, is more predictable. If a higher QP value represents a coarser quantization (more information loss), then a frame quantized with a higher QP value of X+1 will never require more bits than the same frame quantized with a smaller QP value of X (this ignores corner cases in the entropy coding schemes usually applied to quantized coefficient data). In practice, this means that average bitrate requirement of frames decreases when the QP used to quantize them is increased. FIG. 3 shows how the bitrate of a video sequence decreases as the QP increases. The bitrate numbers and the QP values in FIG. 3 are just examples. In real life, the numbers and the values can be different and correlation between QP values and bitrate can vary for different video sequences.